package com.c.ctgproject.ui.review.material

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.fragment.app.FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
import androidx.lifecycle.ViewModelProvider
import com.c.ctgproject.R
import com.c.ctgproject.adapter.BaseFragmentStatePagerAdapter
import com.c.ctgproject.base.BaseActivity
import com.c.ctgproject.fragment.review.material.AgreeMaterialFragment
import com.c.ctgproject.fragment.review.material.RefuseMaterialFragment
import com.c.ctgproject.fragment.review.material.WaitMaterialFragment
import com.c.ctgproject.http.ApiMethods
import com.c.ctgproject.http.MyObserver
import com.c.ctgproject.mode.MyConstants
import com.c.ctgproject.utils.*
import kotlinx.android.synthetic.main.activity_material_review.*
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
import kotlin.concurrent.thread

/**
 *作者:LiBW
 *创建日期: 2020/9/9
 *描述: 物料单审核 页面
 */
class MaterialReviewActivity : BaseActivity() {

    override fun getLayout() = R.layout.activity_material_review

    override fun event() {
        changeTransparentStatusBar()
        changeStatusIconColor(true)
        val titles = arrayOf("待审核", "已同意", "已拒绝")
        val fragmentList = ArrayList<Fragment>()
        fragmentList.add(WaitMaterialFragment())
        fragmentList.add(AgreeMaterialFragment())
        fragmentList.add(RefuseMaterialFragment())
        mTabLayout.setupWithViewPager(mViewPager)
        mViewPager.adapter = BaseFragmentStatePagerAdapter(titles, fragmentList, supportFragmentManager, FragmentStatePagerAdapter.POSITION_NONE)
    }

    //是否用于纯展示
    fun getType(): Boolean {
        return intent.getBooleanExtra(MyConstants.JUST_SHOW, false)
    }

    override fun click() {

    }
}